﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace slTestingStreaming
{
	public partial class InlineImage : UserControl
	{
		public InlineImage()
		{
			// Required to initialize variables
			InitializeComponent();
		}


        #region Source


        public ImageSource Source
        {
            get { return (ImageSource)GetValue(SourceProperty); }
            set { SetValue(SourceProperty, value); }
        }

        public static readonly DependencyProperty SourceProperty =
            DependencyProperty.Register("Source", typeof(ImageSource), typeof(InlineImage), new PropertyMetadata(SourceChanged));

        private static void SourceChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
        {
            ((InlineImage)obj).imgSource.Source = (ImageSource)args.NewValue;
        }
        #endregion
	}
}